<!DOCTYPE html>
<html lang="cn">
<head>
    <meta charset="UTF-8">
    <title>链接伪类</title>
    <style type="text/css">
        table {
            border: 2px solid black;
        }

        td {
            border: 2px solid black;
            vertical-align: middle;
            height: 30px;
            width: 30px;
        }

        tr:hover {
            background-color: yellow;
        }

        td:hover,
        td:hover ~ td {
            background-color: red;
        }
    </style>
</head>
<body>
<table >
    <tr>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
    </tr>
</table>
</body>
</html>